<?php

namespace maotool\src\test;

use maotool\util\PhoneUtil;
use PHPUnit\Framework\TestCase;

class PhoneUtilTest extends TestCase
{

    public function testIndex()
    {
        echo PhoneUtil::hideBetween("18571633036")."\n";
        echo PhoneUtil::hideBetween("13125000869")."\n";
        $this->assertTrue(true);
    }

    public function testIsPhone()
    {
        echo PhoneUtil::isPhone("18571633036") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("13125000869") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("11111111111") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("2222222") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("+86 18571633036") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("+86 18571633036") ? "是手机号\n" : "不是手机号\n";
        echo PhoneUtil::isPhone("+86  180 4953 1399") ? "是手机号\n" : "不是手机号\n";
        $this->assertTrue(true);
    }

}